upstream {{nginx_conf_name}}{
   server {{api_url}} max_fails=3 weight=1 fail_timeout=60s;
}
server {
	listen       80;
	server_name  {{nginx_server_name}};
	access_log  logs/{{nginx_conf_name}}_access.log;
	error_log logs/{{nginx_conf_name}}_error.log;
	location /admin {
	   # root   html;
	   # index  index.html index.htm;
	   proxy_read_timeout      300;
	   proxy_connect_timeout   300;
	   proxy_redirect          off;
	   proxy_set_header    Host                $http_host;
	   proxy_set_header    X-Real-IP           $remote_addr;
	   proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
	   proxy_set_header    X-Forwarded-Proto   $scheme;
	   proxy_set_header    X-Frame-Options     SAMEORIGIN;
           rewrite /admin/(.*) /$1 break;
	   proxy_pass http://{{nginx_conf_name}};

	}
        location / {
            root {{server_root}};
            try_files $uri $uri/ @router;
            index index.html;
        }
        location @router {
            rewrite ^.*$ /index.html last;
        }

	error_page   500 502 503 504  /50x.html;
	location = /50x.html {
		root   html;
	}
}
####
